package Coding.Th;

public class Sleep2 {

    public static void main(String[] args) {

        Thread t1 = new Thread("Sleep"){
            @Override
            public void run() {

                try {
                    Thread.sleep(10000);
                } catch (InterruptedException e) {
                    System.out.println(getName() +"睡呢吗");
                }
                System.out.println("睡得真好");
            }
        };
        t1.start();
    }
}
